package flex.cc.order.manage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import flex.cc.order.manage.dao.OrderRescueDao;
import flex.cc.order.manage.dto.order.OrderRescueEntity;
import flex.cc.order.manage.dto.vo.RescueInforVo;
import flex.cc.order.manage.service.OrderRescueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @author wkangle
 * @className OrderCustomerServiceImpl
 * @description 服务单保单信息service实现类
 * @time 2021-09-06 15:53:10
 */
@Service("OrderRescueService")
@Transactional(rollbackFor = Exception.class)
public class OrderRescueServiceImpl extends ServiceImpl<OrderRescueDao, OrderRescueEntity> implements OrderRescueService {


    @Autowired
    private OrderRescueDao orderRescueDao;

    /**
     * @param orderRescueEntity
     * @return
     * @description 添加一条记录
     * @author wkangle
     * @time 2021/09/08 0008 8:58
     * @exception/throws
     */
    @Override
    public int insert(OrderRescueEntity orderRescueEntity) {
        return orderRescueDao.insert(orderRescueEntity);
    }

    /**
     * @param params 查询条件
     * @return
     * @description 根据查询条件查询服务单待救援信息
     * @author wkangle
     * @time 2021-09-08 16:18:51
     * @exception/throws
     */
    @Override
    public OrderRescueEntity getOneByParams(Map<String, Object> params) {
        return orderRescueDao.getOneByParams(params);
    }

    /**
	 *
	 * @author WANGCONG
	 * 2021年9月9日上午10:59:17
	 * @desc 根据救援单号查询救援信息
	 */
	@Override
	public RescueInforVo queryRescueInforByOrderNo(String orderNo) {
		return orderRescueDao.queryRescueInforByOrderNo(orderNo);
	}

    /**
     * @param orderRescueEntity
     * @return
     * @description 更新
     * @author wkangle
     * @time 2021-09-12 15:19:36
     * @exception/throws
     */
    @Override
    public int update(OrderRescueEntity orderRescueEntity) {
        return orderRescueDao.update(orderRescueEntity);
    }
}
